﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Hawayel.RFC.Engine.DataStructures
{
    /// <summary>
    /// 
    /// </summary>
    public class ProcessSettings
    {
        /// <summary>
        /// 
        /// </summary>
        private const string FileTypesDefault = @"*";

        /// <summary>
        /// 
        /// </summary>
        private const SearchOption SearchOptionDefault = SearchOption.AllDirectories;

        /// <summary>
        /// 
        /// </summary>
        private const bool OverwriteExistingDefault = true;

        /// <summary>
        /// 
        /// </summary>
        private string _fileTypes = ProcessSettings.FileTypesDefault;

        /// <summary>
        /// 
        /// </summary>
        private SearchOption _searchOption = ProcessSettings.SearchOptionDefault;

        /// <summary>
        /// 
        /// </summary>
        private bool _overwriteExisting = ProcessSettings.OverwriteExistingDefault;

        /// <summary>
        /// 
        /// </summary>
        public string SourceFolder { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string FileTypes 
        {
            get { return _fileTypes; }
            set { _fileTypes = string.IsNullOrWhiteSpace(value) ? ProcessSettings.FileTypesDefault : value; } 
        }

        /// <summary>
        /// 
        /// </summary>
        public SearchOption SearchOption
        {
            get { return _searchOption; }
            set { _searchOption = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public int MaxFiles { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string DestinationFolder { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public bool OverwriteExisting
        {
            get { return _overwriteExisting; }
            //set { _overwriteExisting = value; } .. for now we only support overwrit!
        }

    }
}
